<?php /* Smarty version 2.6.19, created on 2009-02-03 18:10:33
         compiled from admin/admin_auth.tpl */ ?>
<?php echo '
  <script type="text/javascript">
<!--
function confirmDelete(articleId) {
if (confirm("This will Remove the authorisation setting. Continue?"))
  '; ?>

document.location = "<?php echo $this->_tpl_vars['pagename']; ?>
&action=delete&id=" + articleId;
}
//-->
</script>
<h2>Authorization Manager</h2>
<?php if ($this->_tpl_vars['action'] == ""): ?>
<?php if ($this->_tpl_vars['addallowed']): ?><div class="toplinks"><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=new" title="New authorization"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/add.png" alt="New authorization" border="0" /></a>
</div><?php endif; ?>
<?php if ($this->_tpl_vars['numauths'] > 0): ?>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center" class="table sortable-onload-2 rowstyle-alt paginate-15" id="sortTable">
<thead>
  <tr valign="top"> 
    <th width="8%" class="smallhead"></th>
    <th class="smallhead sortable" width="30%">Name</th>
    <th class="smallhead sortable">Type</th>
  </tr>
  </thead>
  <tbody>
 <?php unset($this->_sections['front']);
$this->_sections['front']['name'] = 'front';
$this->_sections['front']['loop'] = is_array($_loop=$this->_tpl_vars['numauths']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['front']['show'] = true;
$this->_sections['front']['max'] = $this->_sections['front']['loop'];
$this->_sections['front']['step'] = 1;
$this->_sections['front']['start'] = $this->_sections['front']['step'] > 0 ? 0 : $this->_sections['front']['loop']-1;
if ($this->_sections['front']['show']) {
    $this->_sections['front']['total'] = $this->_sections['front']['loop'];
    if ($this->_sections['front']['total'] == 0)
        $this->_sections['front']['show'] = false;
} else
    $this->_sections['front']['total'] = 0;
if ($this->_sections['front']['show']):

            for ($this->_sections['front']['index'] = $this->_sections['front']['start'], $this->_sections['front']['iteration'] = 1;
                 $this->_sections['front']['iteration'] <= $this->_sections['front']['total'];
                 $this->_sections['front']['index'] += $this->_sections['front']['step'], $this->_sections['front']['iteration']++):
$this->_sections['front']['rownum'] = $this->_sections['front']['iteration'];
$this->_sections['front']['index_prev'] = $this->_sections['front']['index'] - $this->_sections['front']['step'];
$this->_sections['front']['index_next'] = $this->_sections['front']['index'] + $this->_sections['front']['step'];
$this->_sections['front']['first']      = ($this->_sections['front']['iteration'] == 1);
$this->_sections['front']['last']       = ($this->_sections['front']['iteration'] == $this->_sections['front']['total']);
?>
	  <tr class="text" valign="middle"> 
		<td class="text" ><div align="center"><?php if ($this->_tpl_vars['editallowed']): ?><a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;id=<?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['id']; ?>
&amp;action=edit"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit.gif" border="0" alt="Edit Authorizations for <?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['authname']; ?>
" title="Edit Authorizations for <?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['authname']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/edit_grey.gif" border="0" alt="Editing Disabled" title="Editing Disabled" /><?php endif; ?>&nbsp;&nbsp;<?php if ($this->_tpl_vars['deleteallowed']): ?><a href="javascript:confirmDelete(<?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['id']; ?>
)"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete.gif" border="0" alt="Remove Authorizations for <?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['authname']; ?>
" title="Remove Authorizations for <?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['authname']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete_grey.gif" border="0" alt="Deleting Disabled" title="Deleting Disabled" /><?php endif; ?></div></td>
		<td class="text"><div align="left"><?php echo $this->_tpl_vars['auths'][$this->_sections['front']['index']]['authname']; ?>
</div></td>
        <td class="text"><?php if ($this->_tpl_vars['auths'][$this->_sections['front']['index']]['type'] == 1): ?>User Based<?php elseif ($this->_tpl_vars['auths'][$this->_sections['front']['index']]['type'] == 2): ?>Group Based<?php else: ?>Unknown. Possibly pre-CMScout 2.0<?php endif; ?></td>
      </tr>  
    <?php endfor; endif; ?>
    </tbody>
</table>
<?php else: ?>
<div align="center">No allow authorizations</div>
<?php endif; ?>
<?php elseif ($this->_tpl_vars['action'] == 'new' || $this->_tpl_vars['action'] == 'edit'): ?>
<?php echo '
  <script type="text/javascript">
<!--
function checkAll(type, action) 
{
    switch (type)
    {
        case \'dynamic\':
            '; ?>
itemList = [<?php unset($this->_sections['dynamic']);
$this->_sections['dynamic']['name'] = 'dynamic';
$this->_sections['dynamic']['loop'] = is_array($_loop=$this->_tpl_vars['numdynamic']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['dynamic']['show'] = true;
$this->_sections['dynamic']['max'] = $this->_sections['dynamic']['loop'];
$this->_sections['dynamic']['step'] = 1;
$this->_sections['dynamic']['start'] = $this->_sections['dynamic']['step'] > 0 ? 0 : $this->_sections['dynamic']['loop']-1;
if ($this->_sections['dynamic']['show']) {
    $this->_sections['dynamic']['total'] = $this->_sections['dynamic']['loop'];
    if ($this->_sections['dynamic']['total'] == 0)
        $this->_sections['dynamic']['show'] = false;
} else
    $this->_sections['dynamic']['total'] = 0;
if ($this->_sections['dynamic']['show']):

            for ($this->_sections['dynamic']['index'] = $this->_sections['dynamic']['start'], $this->_sections['dynamic']['iteration'] = 1;
                 $this->_sections['dynamic']['iteration'] <= $this->_sections['dynamic']['total'];
                 $this->_sections['dynamic']['index'] += $this->_sections['dynamic']['step'], $this->_sections['dynamic']['iteration']++):
$this->_sections['dynamic']['rownum'] = $this->_sections['dynamic']['iteration'];
$this->_sections['dynamic']['index_prev'] = $this->_sections['dynamic']['index'] - $this->_sections['dynamic']['step'];
$this->_sections['dynamic']['index_next'] = $this->_sections['dynamic']['index'] + $this->_sections['dynamic']['step'];
$this->_sections['dynamic']['first']      = ($this->_sections['dynamic']['iteration'] == 1);
$this->_sections['dynamic']['last']       = ($this->_sections['dynamic']['iteration'] == $this->_sections['dynamic']['total']);
?>'<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
'<?php if ($this->_sections['dynamic']['iteration'] < $this->_tpl_vars['numdynamic']): ?>,<?php endif; ?><?php endfor; endif; ?>];
            number = <?php echo $this->_tpl_vars['numdynamic']; ?>
;<?php echo '
            break;
        case \'permissions\':
            '; ?>
itemList = [<?php unset($this->_sections['permissions']);
$this->_sections['permissions']['name'] = 'permissions';
$this->_sections['permissions']['loop'] = is_array($_loop=$this->_tpl_vars['numperms']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['permissions']['show'] = true;
$this->_sections['permissions']['max'] = $this->_sections['permissions']['loop'];
$this->_sections['permissions']['step'] = 1;
$this->_sections['permissions']['start'] = $this->_sections['permissions']['step'] > 0 ? 0 : $this->_sections['permissions']['loop']-1;
if ($this->_sections['permissions']['show']) {
    $this->_sections['permissions']['total'] = $this->_sections['permissions']['loop'];
    if ($this->_sections['permissions']['total'] == 0)
        $this->_sections['permissions']['show'] = false;
} else
    $this->_sections['permissions']['total'] = 0;
if ($this->_sections['permissions']['show']):

            for ($this->_sections['permissions']['index'] = $this->_sections['permissions']['start'], $this->_sections['permissions']['iteration'] = 1;
                 $this->_sections['permissions']['iteration'] <= $this->_sections['permissions']['total'];
                 $this->_sections['permissions']['index'] += $this->_sections['permissions']['step'], $this->_sections['permissions']['iteration']++):
$this->_sections['permissions']['rownum'] = $this->_sections['permissions']['iteration'];
$this->_sections['permissions']['index_prev'] = $this->_sections['permissions']['index'] - $this->_sections['permissions']['step'];
$this->_sections['permissions']['index_next'] = $this->_sections['permissions']['index'] + $this->_sections['permissions']['step'];
$this->_sections['permissions']['first']      = ($this->_sections['permissions']['iteration'] == 1);
$this->_sections['permissions']['last']       = ($this->_sections['permissions']['iteration'] == $this->_sections['permissions']['total']);
?>'<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
'<?php if ($this->_sections['permissions']['iteration'] < $this->_tpl_vars['numperms']): ?>,<?php endif; ?><?php endfor; endif; ?>];
            number = <?php echo $this->_tpl_vars['numperms']; ?>
;<?php echo '
            break;
        case \'static\':
            '; ?>
itemList = [<?php unset($this->_sections['static']);
$this->_sections['static']['name'] = 'static';
$this->_sections['static']['loop'] = is_array($_loop=$this->_tpl_vars['numstatic']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['static']['show'] = true;
$this->_sections['static']['max'] = $this->_sections['static']['loop'];
$this->_sections['static']['step'] = 1;
$this->_sections['static']['start'] = $this->_sections['static']['step'] > 0 ? 0 : $this->_sections['static']['loop']-1;
if ($this->_sections['static']['show']) {
    $this->_sections['static']['total'] = $this->_sections['static']['loop'];
    if ($this->_sections['static']['total'] == 0)
        $this->_sections['static']['show'] = false;
} else
    $this->_sections['static']['total'] = 0;
if ($this->_sections['static']['show']):

            for ($this->_sections['static']['index'] = $this->_sections['static']['start'], $this->_sections['static']['iteration'] = 1;
                 $this->_sections['static']['iteration'] <= $this->_sections['static']['total'];
                 $this->_sections['static']['index'] += $this->_sections['static']['step'], $this->_sections['static']['iteration']++):
$this->_sections['static']['rownum'] = $this->_sections['static']['iteration'];
$this->_sections['static']['index_prev'] = $this->_sections['static']['index'] - $this->_sections['static']['step'];
$this->_sections['static']['index_next'] = $this->_sections['static']['index'] + $this->_sections['static']['step'];
$this->_sections['static']['first']      = ($this->_sections['static']['iteration'] == 1);
$this->_sections['static']['last']       = ($this->_sections['static']['iteration'] == $this->_sections['static']['total']);
?>'<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
'<?php if ($this->_sections['static']['iteration'] < $this->_tpl_vars['numstatic']): ?>,<?php endif; ?><?php endfor; endif; ?>];
            number = <?php echo $this->_tpl_vars['numstatic']; ?>
;<?php echo '
            break;
        case \'subsites\':
            '; ?>
itemList = [<?php unset($this->_sections['subsite']);
$this->_sections['subsite']['name'] = 'subsite';
$this->_sections['subsite']['loop'] = is_array($_loop=$this->_tpl_vars['numsites']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['subsite']['show'] = true;
$this->_sections['subsite']['max'] = $this->_sections['subsite']['loop'];
$this->_sections['subsite']['step'] = 1;
$this->_sections['subsite']['start'] = $this->_sections['subsite']['step'] > 0 ? 0 : $this->_sections['subsite']['loop']-1;
if ($this->_sections['subsite']['show']) {
    $this->_sections['subsite']['total'] = $this->_sections['subsite']['loop'];
    if ($this->_sections['subsite']['total'] == 0)
        $this->_sections['subsite']['show'] = false;
} else
    $this->_sections['subsite']['total'] = 0;
if ($this->_sections['subsite']['show']):

            for ($this->_sections['subsite']['index'] = $this->_sections['subsite']['start'], $this->_sections['subsite']['iteration'] = 1;
                 $this->_sections['subsite']['iteration'] <= $this->_sections['subsite']['total'];
                 $this->_sections['subsite']['index'] += $this->_sections['subsite']['step'], $this->_sections['subsite']['iteration']++):
$this->_sections['subsite']['rownum'] = $this->_sections['subsite']['iteration'];
$this->_sections['subsite']['index_prev'] = $this->_sections['subsite']['index'] - $this->_sections['subsite']['step'];
$this->_sections['subsite']['index_next'] = $this->_sections['subsite']['index'] + $this->_sections['subsite']['step'];
$this->_sections['subsite']['first']      = ($this->_sections['subsite']['iteration'] == 1);
$this->_sections['subsite']['last']       = ($this->_sections['subsite']['iteration'] == $this->_sections['subsite']['total']);
?>'<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsite']['index']]['id']; ?>
'<?php if ($this->_sections['subsite']['iteration'] < $this->_tpl_vars['numsites']): ?>,<?php endif; ?><?php endfor; endif; ?>];
            number = <?php echo $this->_tpl_vars['numsites']; ?>
;<?php echo '
            break;
    }
    for (i=0;i<number;i++)
    {
        document.getElementById(type + itemList[i] + action).checked = document.getElementById(type+action+\'_all\').checked;
    }
}
//-->
</script>
  '; ?>

    <form name="form2" method="post" action="">
    <table style="width:500px" class="formlist" align="center">
    <tr><td class="text" align="center" colspan="2"><div align="center">
    <div class="field">
        <label for="name" class="label">For<img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/help.png" class="hintanchor" alt="Hint" title="For which group does this authorisation apply?" /></label><div class="inputboxwrapper"><select name="name" id="name" class="inputbox">
        <optgroup label="Users">
            <?php unset($this->_sections['user']);
$this->_sections['user']['name'] = 'user';
$this->_sections['user']['loop'] = is_array($_loop=$this->_tpl_vars['numusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['user']['show'] = true;
$this->_sections['user']['max'] = $this->_sections['user']['loop'];
$this->_sections['user']['step'] = 1;
$this->_sections['user']['start'] = $this->_sections['user']['step'] > 0 ? 0 : $this->_sections['user']['loop']-1;
if ($this->_sections['user']['show']) {
    $this->_sections['user']['total'] = $this->_sections['user']['loop'];
    if ($this->_sections['user']['total'] == 0)
        $this->_sections['user']['show'] = false;
} else
    $this->_sections['user']['total'] = 0;
if ($this->_sections['user']['show']):

            for ($this->_sections['user']['index'] = $this->_sections['user']['start'], $this->_sections['user']['iteration'] = 1;
                 $this->_sections['user']['iteration'] <= $this->_sections['user']['total'];
                 $this->_sections['user']['index'] += $this->_sections['user']['step'], $this->_sections['user']['iteration']++):
$this->_sections['user']['rownum'] = $this->_sections['user']['iteration'];
$this->_sections['user']['index_prev'] = $this->_sections['user']['index'] - $this->_sections['user']['step'];
$this->_sections['user']['index_next'] = $this->_sections['user']['index'] + $this->_sections['user']['step'];
$this->_sections['user']['first']      = ($this->_sections['user']['iteration'] == 1);
$this->_sections['user']['last']       = ($this->_sections['user']['iteration'] == $this->_sections['user']['total']);
?>
                <option value="<?php echo $this->_tpl_vars['users'][$this->_sections['user']['index']]['id']; ?>
.user" <?php if ($this->_tpl_vars['item']['authname'] == $this->_tpl_vars['users'][$this->_sections['user']['index']]['id'] && $this->_tpl_vars['item']['type'] == 1): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['users'][$this->_sections['user']['index']]['uname']; ?>
</option>
            <?php endfor; endif; ?>
            </optgroup>
            <optgroup label="Groups">
            <?php unset($this->_sections['group']);
$this->_sections['group']['name'] = 'group';
$this->_sections['group']['loop'] = is_array($_loop=$this->_tpl_vars['numgroups']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['group']['show'] = true;
$this->_sections['group']['max'] = $this->_sections['group']['loop'];
$this->_sections['group']['step'] = 1;
$this->_sections['group']['start'] = $this->_sections['group']['step'] > 0 ? 0 : $this->_sections['group']['loop']-1;
if ($this->_sections['group']['show']) {
    $this->_sections['group']['total'] = $this->_sections['group']['loop'];
    if ($this->_sections['group']['total'] == 0)
        $this->_sections['group']['show'] = false;
} else
    $this->_sections['group']['total'] = 0;
if ($this->_sections['group']['show']):

            for ($this->_sections['group']['index'] = $this->_sections['group']['start'], $this->_sections['group']['iteration'] = 1;
                 $this->_sections['group']['iteration'] <= $this->_sections['group']['total'];
                 $this->_sections['group']['index'] += $this->_sections['group']['step'], $this->_sections['group']['iteration']++):
$this->_sections['group']['rownum'] = $this->_sections['group']['iteration'];
$this->_sections['group']['index_prev'] = $this->_sections['group']['index'] - $this->_sections['group']['step'];
$this->_sections['group']['index_next'] = $this->_sections['group']['index'] + $this->_sections['group']['step'];
$this->_sections['group']['first']      = ($this->_sections['group']['iteration'] == 1);
$this->_sections['group']['last']       = ($this->_sections['group']['iteration'] == $this->_sections['group']['total']);
?>
                <option value="<?php echo $this->_tpl_vars['groups'][$this->_sections['group']['index']]['id']; ?>
.group" <?php if ($this->_tpl_vars['item']['authname'] == $this->_tpl_vars['groups'][$this->_sections['group']['index']]['id'] && $this->_tpl_vars['item']['type'] == 2): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['groups'][$this->_sections['group']['index']]['teamname']; ?>
</option>
            <?php endfor; endif; ?>
            </optgroup>
        </select></div>
</div>
            </div>
            </td>
    </tr>
          <tr>
          <td colspan="2" class="text">
                <div align="center">
<div id="navcontainer">
<h4 title="dtab">CMScout Pages</h4>
<div id="dtab" >
<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center" class="table rowstyle-alt paginate-21" id="sortTable">
<thead>
<tr>
    <th class="smallhead">Page</th>
    <th class="smallhead" width="50">Allow</th>
    <th class="smallhead" width="50">Ignore</th>
    <th class="smallhead" width="50">Disallow</th>
</tr>
</thead>
<tbody>
<tr class="text">
    <th class="smallhead">Select All</th>
    <th class="smallhead" style="text-align:center"><label for="dynamic_allow_all"><input type="radio" value="1" name="dynamic_all" id="dynamic_allow_all" onclick="checkAll('dynamic', '_allow')" /></label></th>
    <th class="smallhead" style="text-align:center"><label for="dynamic_ignore_all"><input type="radio" value="0" name="dynamic_all" id="dynamic_ignore_all" onclick="checkAll('dynamic', '_ignore')"/></label></th>
    <th class="smallhead" style="text-align:center"><label for="dynamic_deny_all"><input type="radio" value="-1" name="dynamic_all" id="dynamic_deny_all" onclick="checkAll('dynamic', '_deny')"/></label></th>
</tr>
<?php unset($this->_sections['dynamic']);
$this->_sections['dynamic']['name'] = 'dynamic';
$this->_sections['dynamic']['loop'] = is_array($_loop=$this->_tpl_vars['numdynamic']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['dynamic']['show'] = true;
$this->_sections['dynamic']['max'] = $this->_sections['dynamic']['loop'];
$this->_sections['dynamic']['step'] = 1;
$this->_sections['dynamic']['start'] = $this->_sections['dynamic']['step'] > 0 ? 0 : $this->_sections['dynamic']['loop']-1;
if ($this->_sections['dynamic']['show']) {
    $this->_sections['dynamic']['total'] = $this->_sections['dynamic']['loop'];
    if ($this->_sections['dynamic']['total'] == 0)
        $this->_sections['dynamic']['show'] = false;
} else
    $this->_sections['dynamic']['total'] = 0;
if ($this->_sections['dynamic']['show']):

            for ($this->_sections['dynamic']['index'] = $this->_sections['dynamic']['start'], $this->_sections['dynamic']['iteration'] = 1;
                 $this->_sections['dynamic']['iteration'] <= $this->_sections['dynamic']['total'];
                 $this->_sections['dynamic']['index'] += $this->_sections['dynamic']['step'], $this->_sections['dynamic']['iteration']++):
$this->_sections['dynamic']['rownum'] = $this->_sections['dynamic']['iteration'];
$this->_sections['dynamic']['index_prev'] = $this->_sections['dynamic']['index'] - $this->_sections['dynamic']['step'];
$this->_sections['dynamic']['index_next'] = $this->_sections['dynamic']['index'] + $this->_sections['dynamic']['step'];
$this->_sections['dynamic']['first']      = ($this->_sections['dynamic']['iteration'] == 1);
$this->_sections['dynamic']['last']       = ($this->_sections['dynamic']['iteration'] == $this->_sections['dynamic']['total']);
?>
            <?php $this->assign('id', $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']); ?>
            <tr class="text">
                <td class="text"><?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['name']; ?>
</td>
                <td class="text" style="text-align:center"><label for="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_allow"><input type="radio" value="1" name="dynamic[<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
]" id="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_allow" <?php if ($this->_tpl_vars['item']['dynamic'][$this->_tpl_vars['id']] == 1): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_ignore"><input type="radio" value="0" name="dynamic[<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
]" id="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_ignore" <?php if ($this->_tpl_vars['item']['dynamic'][$this->_tpl_vars['id']] == 0): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_deny"><input type="radio" value="-1" name="dynamic[<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
]" id="dynamic<?php echo $this->_tpl_vars['dynamic'][$this->_sections['dynamic']['index']]['id']; ?>
_deny" <?php if ($this->_tpl_vars['item']['dynamic'][$this->_tpl_vars['id']] == -1): ?>checked="checked"<?php endif; ?> /></label></td>
            </tr>
<?php endfor; endif; ?> </tbody>
</table> 
</div>         
    
<h4 title="permi">User Contributions</h4>    
<div id="permi" >
<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center" class="table rowstyle-alt paginate-21" id="sortTable2">
<thead>
<tr>
    <th class="smallhead">Page</th>
    <th class="smallhead" width="50">Allow</th>
    <th class="smallhead" width="50">Ignore</th>
    <th class="smallhead" width="50">Disallow</th>
</tr>
</thead>
<tbody>
<tr class="text">
    <th class="smallhead">Select All</th>
    <th class="smallhead" style="text-align:center"><label for="permissions_allow_all"><input type="radio" value="1" name="permissions_all" id="permissions_allow_all" onclick="checkAll('permissions', '_allow')" /></label></th>
    <th class="smallhead" style="text-align:center"><label for="permissions_ignore_all"><input type="radio" value="0" name="permissions_all" id="permissions_ignore_all" onclick="checkAll('permissions', '_ignore')"/></label></th>
    <th class="smallhead" style="text-align:center"><label for="permissions_deny_all"><input type="radio" value="-1" name="permissions_all" id="permissions_deny_all" onclick="checkAll('permissions', '_deny')"/></label></th>
</tr>
<?php unset($this->_sections['permissions']);
$this->_sections['permissions']['name'] = 'permissions';
$this->_sections['permissions']['loop'] = is_array($_loop=$this->_tpl_vars['numperms']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['permissions']['show'] = true;
$this->_sections['permissions']['max'] = $this->_sections['permissions']['loop'];
$this->_sections['permissions']['step'] = 1;
$this->_sections['permissions']['start'] = $this->_sections['permissions']['step'] > 0 ? 0 : $this->_sections['permissions']['loop']-1;
if ($this->_sections['permissions']['show']) {
    $this->_sections['permissions']['total'] = $this->_sections['permissions']['loop'];
    if ($this->_sections['permissions']['total'] == 0)
        $this->_sections['permissions']['show'] = false;
} else
    $this->_sections['permissions']['total'] = 0;
if ($this->_sections['permissions']['show']):

            for ($this->_sections['permissions']['index'] = $this->_sections['permissions']['start'], $this->_sections['permissions']['iteration'] = 1;
                 $this->_sections['permissions']['iteration'] <= $this->_sections['permissions']['total'];
                 $this->_sections['permissions']['index'] += $this->_sections['permissions']['step'], $this->_sections['permissions']['iteration']++):
$this->_sections['permissions']['rownum'] = $this->_sections['permissions']['iteration'];
$this->_sections['permissions']['index_prev'] = $this->_sections['permissions']['index'] - $this->_sections['permissions']['step'];
$this->_sections['permissions']['index_next'] = $this->_sections['permissions']['index'] + $this->_sections['permissions']['step'];
$this->_sections['permissions']['first']      = ($this->_sections['permissions']['iteration'] == 1);
$this->_sections['permissions']['last']       = ($this->_sections['permissions']['iteration'] == $this->_sections['permissions']['total']);
?>
            <?php $this->assign('id', $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']); ?>
            <tr class="text">
                <td class="text"><?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['name']; ?>
</td>
                <td class="text" style="text-align:center"><label for="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_allow"><input type="radio" value="1" name="permissions[<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
]" id="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_allow" <?php if ($this->_tpl_vars['item']['permission'][$this->_tpl_vars['id']] == 1): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_ignore"><input type="radio" value="0" name="permissions[<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
]" id="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_ignore" <?php if ($this->_tpl_vars['item']['permission'][$this->_tpl_vars['id']] == 0): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_deny"><input type="radio" value="-1" name="permissions[<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
]" id="permissions<?php echo $this->_tpl_vars['permissions'][$this->_sections['permissions']['index']]['id']; ?>
_deny" <?php if ($this->_tpl_vars['item']['permission'][$this->_tpl_vars['id']] == -1): ?>checked="checked"<?php endif; ?> /></label></td>
            </tr>
<?php endfor; endif; ?> </tbody>
</table>      
</div>
    
<h4 title="content">Content</h4>    
<div id="content" >
<?php if ($this->_tpl_vars['numstatic'] > 0): ?>
<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center" class="table rowstyle-alt paginate-21" id="sortTable3">
<thead>
<tr>
    <th class="smallhead">Page</th>
    <th class="smallhead" width="50">Allow</th>
    <th class="smallhead" width="50">Ignore</th>
    <th class="smallhead" width="50">Disallow</th>
</tr>
</thead>
<tbody>
<tr class="text">
    <th class="smallhead">Select All</th>
    <th class="smallhead" style="text-align:center"><label for="static_allow_all"><input type="radio" value="1" name="static_all" id="static_allow_all" onclick="checkAll('static', '_allow')" /></label></th>
    <th class="smallhead" style="text-align:center"><label for="static_ignore_all"><input type="radio" value="0" name="static_all" id="static_ignore_all" onclick="checkAll('static', '_ignore')"/></label></th>
    <th class="smallhead" style="text-align:center"><label for="static_deny_all"><input type="radio" value="-1" name="static_all" id="static_deny_all" onclick="checkAll('static', '_deny')"/></label></th>
</tr>
<?php unset($this->_sections['static']);
$this->_sections['static']['name'] = 'static';
$this->_sections['static']['loop'] = is_array($_loop=$this->_tpl_vars['numstatic']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['static']['show'] = true;
$this->_sections['static']['max'] = $this->_sections['static']['loop'];
$this->_sections['static']['step'] = 1;
$this->_sections['static']['start'] = $this->_sections['static']['step'] > 0 ? 0 : $this->_sections['static']['loop']-1;
if ($this->_sections['static']['show']) {
    $this->_sections['static']['total'] = $this->_sections['static']['loop'];
    if ($this->_sections['static']['total'] == 0)
        $this->_sections['static']['show'] = false;
} else
    $this->_sections['static']['total'] = 0;
if ($this->_sections['static']['show']):

            for ($this->_sections['static']['index'] = $this->_sections['static']['start'], $this->_sections['static']['iteration'] = 1;
                 $this->_sections['static']['iteration'] <= $this->_sections['static']['total'];
                 $this->_sections['static']['index'] += $this->_sections['static']['step'], $this->_sections['static']['iteration']++):
$this->_sections['static']['rownum'] = $this->_sections['static']['iteration'];
$this->_sections['static']['index_prev'] = $this->_sections['static']['index'] - $this->_sections['static']['step'];
$this->_sections['static']['index_next'] = $this->_sections['static']['index'] + $this->_sections['static']['step'];
$this->_sections['static']['first']      = ($this->_sections['static']['iteration'] == 1);
$this->_sections['static']['last']       = ($this->_sections['static']['iteration'] == $this->_sections['static']['total']);
?>
            <?php $this->assign('id', $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']); ?>
            <tr class="text">
                <td class="text"><?php if ($this->_tpl_vars['static'][$this->_sections['static']['index']]['friendly'] == ""): ?><?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['name']; ?>
<?php else: ?><?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['friendly']; ?>
<?php endif; ?></td>
                <td class="text" style="text-align:center"><label for="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_allow"><input type="radio" value="1" name="static[<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
]" id="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_allow" <?php if ($this->_tpl_vars['item']['static'][$this->_tpl_vars['id']] == 1): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_ignore"><input type="radio" value="0" name="static[<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
]" id="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_ignore" <?php if ($this->_tpl_vars['item']['static'][$this->_tpl_vars['id']] == 0): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_deny"><input type="radio" value="-1" name="static[<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
]" id="static<?php echo $this->_tpl_vars['static'][$this->_sections['static']['index']]['id']; ?>
_deny" <?php if ($this->_tpl_vars['item']['static'][$this->_tpl_vars['id']] == -1): ?>checked="checked"<?php endif; ?> /></label></td>
            </tr>
<?php endfor; endif; ?> </tbody>
</table>  
<?php else: ?>
No content pages available
<?php endif; ?>       
</div> 

<h4 title="subsite">Subsites</h4>
<div id="subsite" >
<?php if ($this->_tpl_vars['numsites'] > 0): ?>
<table width="98%" cellpadding="0" cellspacing="0" border="0" align="center" class="table rowstyle-alt paginate-21" id="sortTable4">
<thead>
<tr>
    <th class="smallhead">Page</th>
    <th class="smallhead" width="50">Allow</th>
    <th class="smallhead" width="50">Ignore</th>
    <th class="smallhead" width="50">Disallow</th>
</tr>
</thead>
<tbody>
<tr class="text">
    <th class="smallhead">Select All</th>
    <th class="smallhead" style="text-align:center"><label for="subsites_allow_all"><input type="radio" value="1" name="subsites_all" id="subsites_allow_all" onclick="checkAll('subsites', '_allow')" /></label></th>
    <th class="smallhead" style="text-align:center"><label for="subsites_ignore_all"><input type="radio" value="0" name="subsites_all" id="subsites_ignore_all" onclick="checkAll('subsites', '_ignore')"/></label></th>
    <th class="smallhead" style="text-align:center"><label for="subsites_deny_all"><input type="radio" value="-1" name="subsites_all" id="subsites_deny_all" onclick="checkAll('subsites', '_deny')"/></label></th>
</tr>
<?php unset($this->_sections['subsites']);
$this->_sections['subsites']['name'] = 'subsites';
$this->_sections['subsites']['loop'] = is_array($_loop=$this->_tpl_vars['numsites']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['subsites']['show'] = true;
$this->_sections['subsites']['max'] = $this->_sections['subsites']['loop'];
$this->_sections['subsites']['step'] = 1;
$this->_sections['subsites']['start'] = $this->_sections['subsites']['step'] > 0 ? 0 : $this->_sections['subsites']['loop']-1;
if ($this->_sections['subsites']['show']) {
    $this->_sections['subsites']['total'] = $this->_sections['subsites']['loop'];
    if ($this->_sections['subsites']['total'] == 0)
        $this->_sections['subsites']['show'] = false;
} else
    $this->_sections['subsites']['total'] = 0;
if ($this->_sections['subsites']['show']):

            for ($this->_sections['subsites']['index'] = $this->_sections['subsites']['start'], $this->_sections['subsites']['iteration'] = 1;
                 $this->_sections['subsites']['iteration'] <= $this->_sections['subsites']['total'];
                 $this->_sections['subsites']['index'] += $this->_sections['subsites']['step'], $this->_sections['subsites']['iteration']++):
$this->_sections['subsites']['rownum'] = $this->_sections['subsites']['iteration'];
$this->_sections['subsites']['index_prev'] = $this->_sections['subsites']['index'] - $this->_sections['subsites']['step'];
$this->_sections['subsites']['index_next'] = $this->_sections['subsites']['index'] + $this->_sections['subsites']['step'];
$this->_sections['subsites']['first']      = ($this->_sections['subsites']['iteration'] == 1);
$this->_sections['subsites']['last']       = ($this->_sections['subsites']['iteration'] == $this->_sections['subsites']['total']);
?>
            <?php $this->assign('id', $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']); ?>
            <tr class="text">
                <td class="text"><?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['name']; ?>
</td>
                <td class="text" style="text-align:center"><label for="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_allow"><input type="radio" value="1" name="subsites[<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
]" id="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_allow" <?php if ($this->_tpl_vars['item']['subsites'][$this->_tpl_vars['id']] == 1): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_ignore"><input type="radio" value="0" name="subsites[<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
]" id="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_ignore" <?php if ($this->_tpl_vars['item']['subsites'][$this->_tpl_vars['id']] == 0): ?>checked="checked"<?php endif; ?> /></label></td>
                <td class="text" style="text-align:center"><label for="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_deny"><input type="radio" value="-1" name="subsites[<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
]" id="subsites<?php echo $this->_tpl_vars['subsites'][$this->_sections['subsites']['index']]['id']; ?>
_deny" <?php if ($this->_tpl_vars['item']['subsites'][$this->_tpl_vars['id']] == -1): ?>checked="checked"<?php endif; ?> /></label></td>
            </tr>
<?php endfor; endif; ?> </tbody>
</table>  
<?php else: ?>
No sub sites available
<?php endif; ?>         
</div> 
</div></div>
         </td>
         </tr>
        <tr>
        <td colspan="2" align="center">
        <input type="submit" name="Submit" value="Submit" class="button" />
         <input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="window.history.go(-1);" class="button" />
       </td></tr>
      </table>

    </form>
<?php endif; ?>